<include file="public:header"/>
<div class='container-fluid mb50 mt40'>
    <div class="row global-top">
        <div class="col-xs-2">
            <a href="{:U('mall/user/index')}" class="return"></a>
        </div>
        <div class="col-xs-8">
            <div class="text">地址管理</div>
        </div>
        <div class="col-xs-2">
        </div>
    </div>
    <div class="row">
        <volist name="address_list" id="val">
            <div class="col-xs-12 b-b J_item mt10 white-bg" data-id="{$val.id}" data-ret_url="{$_GET['ret_url']}">
                <div class="name">
                    <span class="fl">收货人：{$val.name}</span>
                    <span class="fr">{$val.tele}</span>
                </div>
                <div class="text gray">收货地址：{$val.province} {$val.city}{$val.area} {$val.address} {$val.zipcode}
                </div>
                <div class="row mt10 pt10 edit">
                    <div class="col-xs-4">
                        <div class="clearfix">
                            <input type="checkbox" <if condition="$val['is_default']">checked</if> class="J_set_default" style="margin-top: 8px;float:left;">
                            <label class="mt5">设为默认</label>
                        </div>
                    </div>
                    <div class="col-xs-8">
                        <div class="editbtn">
                            <a class="J_del">删除</a>&nbsp;
                            <a class="J_edit" href="{:U(MODULE_NAME.'/edit_address',['id'=>$val[id],'ret_url'=>$_GET['ret_url']])}">编辑地址</a>
                            <if condition="!empty($_GET['ret_url'])">
                                <a class="J_select">选择</a>
                            </if>
                        </div>
                    </div>
                </div>
            </div>
        </volist>
    </div>
    <if condition="count($address_list) lt 10">
        <footer class="bottom-bot mt20">
            <div class="global-submit-bot1">
                <a class="global-submit-btn" href="{:U(MODULE_NAME.'/add_address',['ret_url'=>$_GET['ret_url']])}">添加新地址</a>
            </div>
        </footer>
    </if>
</div>
<include file="public:footer"/>
